import Vue from 'vue'
import Component from 'vue-class-component'
import AlertComponent from '../../ui/alert/alert.component'

import {
  State,
  Getter,
  Action,
  Mutation,
  namespace
} from 'vuex-class'

import './app.component.less'

@Component({
  template: require('./app.component.html')
})
export default class AppComponent extends Vue {
  message: string = 'parent message'

  @State('count') stateCount: any;
  @Mutation('increment') mutationIncrement: any;
  @Action('increment') actionIncrement: any;

  onClick () {
    console.log('AlertComponent', AlertComponent);
    this.actionIncrement().then(() => {
      console.log('actionIncrement actions success');
    })
  }
}
